<!DOCTYPE html>
<html>
    <head>
	<?php require FCPATH . 'application/views/header.php'; ?>
    </head>

    <body>
        <div id="z-body-container">
	    <ul class="path">
		<li class="first"><a href="/backend/home/welcome">首页</a></li>
		<?php if (isset($l_position) && isset($l_position[0])): ?>
		    <?php foreach ($l_position as $item): ?>
			<li><a href="<?php echo isset($item['path']) ? $item['path'] : 'javascript:void(0);'; ?>"><?php echo $item['name']; ?></a></li>
		    <?php endforeach; ?>
		<?php endif; ?>
	    </ul>

	    <div class="main-wrap">
		<?php require file_exists($path = FCPATH . "application/views/backend/{$l_template}.php") ? $path : 'error.php'; ?>
	    </div>
        </div>

	<?php if (count($l_javascript_variables)): ?>
    	<script type="text/javascript">
    <?php foreach ($l_javascript_variables as $key => $value): ?>
	<?php echo "window.{$key} = {$value};\n"; ?>
    <?php endforeach; ?>
    	</script>
	<?php endif; ?>
	<?php if (count($l_javascripts)): ?>
	    <?php foreach ($l_javascripts as $js): ?>
		<?php if (preg_match("/^http:\/\//", $js)): ?>
	    	<script type="text/javascript" rel="" src="<?php echo $js; ?>.js"></script>
		<?php else: ?>
	    	<script type="text/javascript" rel="" src="/assets/js/<?php echo $js; ?>.js"></script>
		<?php endif; ?>
	    <?php endforeach; ?>
	<?php endif; ?>
    </body>
</html>
